//
//  LGManager.h
//  GameDemo
//
//  Created by Happy on 12/16/16.
//  Copyright © 2016 Happy. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "LGShareManager.h"
#import "LGLoginManager.h"
#import "LGPayManager.h"
#import "LGThirdDelegate.h"

#import "LGSDKConfigure.h"
//#import "LGUtils.h"

@interface LGManager : NSObject

+ (instancetype)sharedInstance;

/**
 选择服务器环境，默认YES 线上

 @param isOnline YES:线上；NO:线下
 */
- (void)configureServerEnvironment:(BOOL)isOnline;


/**
 配置微信AppId，微信登录分享需要

 @param appId 微信appid
 */
- (void)configureWeiXinAppId:(NSString *)appId;


- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url;
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options;

@end


@interface LGManager (Login)
/**
 微信登录

 @param callback 回调
 */
- (void)loginInWeiXin:(void(^)(NSError *error, NSDictionary *result))callback;

@end


@interface LGManager (Payment)
/**
 配置支付回调地址

 @param address 回调地址
 */
//- (void)configurePayCallbackAddress:(NSString *)address;

/**
 支付sdk

 @param payItem 支付参数
 @param completion 回调
 */
//- (void)pay:(ZCPayItem *)payItem completion:(ZCPayCompletion)completion;
@end


@interface LGManager (Share)
- (void)share:(LGShareContent *)shareContent shareType:(LGShareType)shareType callback:(void(^)(NSError *error, NSDictionary *result))callback;
/*
 使用教程如下：
 1.分享链接到微信好友(分享到微信朋友圈只需要将wxScene赋值为1)
 ZCBShareContent *shareContent = [[ZCBShareContent alloc] init];
 shareContent.contentType = ZCBShareContentTypeLink;
 shareContent.wxScene = 0;
 shareContent.contentTitle = _title;
 shareContent.contentURL = _httpURL;
 shareContent.contentDescription = des;
 shareContent.thumbImageURL = _imageUrlStr;
 [[LGManager sharedInstance] share:shareContent shareType:ZCBShareTypeWeiXin callback:callback];
 */
@end
